Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plane: tailsitter rate limit second half of VTOL transition. #19286

Merged
merged 8 commits into from
Jan 3, 2022

Conversation

IamPete1
Copy link
Member

This now applys a pitch up rate limit to the second half of the transition into VTOL flight. Rather than just pulling up to Q_TAILSIT_ANG_VT and dumping to the VTOL controller, the pitch up rate is now limited as the same Q_TAILSIT_RAT_VT that the first half of the transition is done at. Once the desired pitch angle is larger than the pitch up limit the limit is removed.
The limit it applied in all modes, except QACRO.

In addition we now no longer run the Z controller in tailsitter VTOL transition or if the throttle state is not unlimited. We always do a full pitch relax on transition entry (if not in Qassist) and pass the current time to tailsitter.in_vtol_transition that already have the time available in the function, this should reduce the chances of a race condition.

The result of these changes are a much smoother transition from the FW pull up to the VTOL flight. You can still see the step as we swap from the FW to VTOL controller, but it is much smoother. This also enables lower Q_TAILSIT_ANG_VT values without a very aggressive pitch up.

@IamPete1
Copy link
Member Author

I have found a wacky interaction with the position controller in some cases.

@IamPete1 IamPete1 removed the WIP label Nov 20, 2021
@IamPete1
Copy link
Member Author

funny stuff is there on master too, seems to be related to position controller limits.

This is master, It presents as a sharp pitch back and then immediately forward again.
image

@IamPete1
Copy link
Member Author

IamPete1 commented Nov 20, 2021

This is a flight, including PSC limit flags and logging (#19313, #19312)

The sharp pitch up starts when the limit is removed.

image

@IamPete1
Copy link
Member Author

I fixed the odd pitch stuff, quadplane was force feeding the position controller velocity targets bypassing the input shaping and velocity limits. The last commit fixes that and uses the input_vel_accel_xy method that behaves correctly .

@IamPete1 IamPete1 force-pushed the tailsitter_vtol_rate_limit branch 2 times, most recently from b4d6c85 to f0ef1cf Compare January 1, 2022 19:45
@IamPete1
Copy link
Member Author

IamPete1 commented Jan 1, 2022

rebased

@IamPete1
Copy link
Member Author

IamPete1 commented Jan 2, 2022

Tested on the CAT and H wing in realflight both inverted and normal transitions and QRTL position controller.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants